/**  
 * @Title: SuccessSeckilled.java
 * @Package org.seckill.entity
 * @Description: TODO(用一句话描述该文件做什么)
 * @author lxp  
 * @date 2016年9月20日 上午10:31:51
 * @version V1.0  
 */
package org.seckill.entity;

import java.util.Date;

/**
 * @ClassName: SuccessSeckilled
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @author ： lxp
 * @date ： 2016年9月20日 上午10:31:51
 *
 */
public class Successkilled {

    /*
     * create TABLE success_seckill( seckill_id BIGINT NOT NULL COMMENT '秒杀商品id', user_phone BIGINT
     * NOT NULL COMMENT '用户手机号', state TINYINT NOT NULL DEFAULT -1 COMMENT '状态标识：-1 ：无效 0：成功 1：已付款'
     * create_time TIMESTAMP NOT NULL COMMENT '创建时间', PRIMARY KEY (seckill_id,user_phone),
     * 联合主键(防止用户重复秒杀) KEY idx_create_time(create_time) )ENGINE=INNODB AUTO_INCREMENT=1000 DEFAULT
     * CHARSET=utf8 COMMENT='秒杀成功明细表'
     */

    private long seckillid;

    private long userphone;

    private short state;

    private Date createtime;
    
    //变通
    //多对一
    private Seckill seckill;

    public long getSeckillid() {
        return seckillid;
    }
    
    public void setSeckillid(long seckillid) {
        this.seckillid = seckillid;
    }

    public long getUserphone() {
        return userphone;
    }

    public void setUserphone(long userphone) {
        this.userphone = userphone;
    }

    public short getState() {
        return state;
    }

    public void setState(short state) {
        this.state = state;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Seckill getSeckill() {
        return seckill;
    }

    public void setSeckill(Seckill seckill) {
        this.seckill = seckill;
    }

    @Override
    public String toString() {
        return "Successkilled [seckillid=" + seckillid + ", userphone=" + userphone + ", state=" + state
                + ", createtime=" + createtime + ", seckill=" + seckill + "]";
    }
    
   
}
